package com.suxiaoxiao.springbootlearn.spring.framework.enable.configuration.importEntity;

import com.suxiaoxiao.springbootlearn.spring.framework.enable.configuration.entity.Blue;
import com.suxiaoxiao.springbootlearn.spring.framework.enable.configuration.entity.Green;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * ImportSelector 方式注入 BEAN
 */
public class ColorImportSelector implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[] {Blue.class.getName(), Green.class.getName()};
    }

}
